<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebSocket客户端程序</title>

    <script src="./chatClient.js"></script>
    <link rel="stylesheet" type="text/css" href="chatClient.css">
</head>
<body>
    <div>
        <h1>WebSocket客户端程序</h1>
        <p>
            服务端url：<input type="text" id="url" value="ws://localhost:1234">
        </p>
        <p>
            <button id="but_connect" onclick="socketConnectOrDis()">连接</button>
            <button id="but_getState" onclick="getState()">WebSocket状态</button>
        </p>
        <p>
            <textarea name="textShow" id="textShowId" cols="60" rows="10" readonly></textarea>
        </p>
        <p>
            <input type="text" id="nick" value="张三" />
            <input type="text" id="inputText" onkeydown="if(event.keyCode==13)sendMessage();"/>
            <button id="but_send" onclick="sendMessage()" disabled>发送数据</button>
        </p>

    </div>
</body>
</html>